package com.tim.app.server.api;

import android.content.Context;
import android.text.TextUtils;

import com.application.library.net.ResponseCallback;
import com.lzy.okhttputils.cache.CacheMode;
import com.tim.app.RT;
import com.tim.app.constant.AppKey;
import com.tim.app.server.logic.UserManager;
import com.tim.app.server.net.HttpMethod;
import com.tim.app.server.net.NetworkInterface;
import com.tim.app.util.PhoneInfoUtil;

import java.util.HashMap;

/**
 * 用户
 */
public class API_User {

    private static volatile API_User api = null;

    private static String API_USER_SCHEME = "";

    public static final String CANCEL_COLLECT = "/moli_mine_consumer/v1/collent/updateByPrimaryKeySelective";//取消收藏

    public static final String ADD_COLLECT = "/moli_mine_consumer/v1/collent/insertSelective";//添加收藏

    private static final String ACTION = "/moli_mine_consumer/v1/action/insertSelective";//用户互动行为

    private static final String CANCEL_CATION = "/moli_mine_consumer/v1/action/updateByPrimaryKeySelective";//取消用户互动行为

    private static final String FOLLOW = "/moli_mine_consumer/v1/concern/insertSelective";//关注

    private static final String CANCEL_FOLLOW = "/moli_mine_consumer/v1/concern/updateByPrimaryKeySelective";//取消关注

    private static final String SEND_FLOWER = "/moli_mine_consumer/v1/flower/insertSelective";//送花

    private static final String GET_INVITE_FRIEND_LIST = "/moli_mine_consumer/v1/concern/selectFriendByInvitation";//获取好友列表

    private static final String GET_INVITE_USER_LIST = "/moli_mine_consumer/v1/concern/selectAdeptTopicAllUserByproblemId";//获取邀请的推荐用户

    private static final String INVITE_TO_ANSWER = "/moli_mine_consumer/v1/action/insertSelective";//邀请回答

    private static final String GET_GOOD_AT_TOPIC = "/moli_mine_consumer/v1/concern/selectAllUserAdeptTopic";//获取用户擅长话题

    private static final String GET_GOOD_AT_TOPIC_PROBLEM = "/moli_mine_consumer/v1/concern/selectUserAdeptTopicProblemList";//获取用户擅长话题的问题列表

    private static final String ADD_PRISE = "/moli_mine_consumer/v1/action/insertSelective";//点赞

    private static final String CANCEL_PRISE = "/moli_mine_consumer/v1/action/updateByPrimaryKeySelective";//取消赞

    private static final String GET_INVITI_PROBLEM_LIST = "/moli_mine_consumer/v1/action/selectInvitationProblemListByUserId";//邀请问题列表

    private static final String ADD_PIC = "/moli_mine_consumer/v1/photo/insertSelective";//上传照片

    private static final String LOGIN = "/moli_mine_consumer/v1/login/loginSelective";//登录

    private static final String GET_PHONE_VERIFICATION_CODE = "/moli_mine_consumer/v1/login/getPhoneAuth";//获取验证码

    private static final String CHECK_PHONE_AUTH_COMMON = "/moli_mine_consumer/v1/login/checkPhoneAuthCommon";//公用验证码检测接口

    private static final String RESET_PASSWORD = "/moli_mine_consumer/v1/login/resetPasswordSelective";//重置密码

    private static final String REGIST = "/moli_mine_consumer/v1/login/registerByPhoneSelective";//注册

    private static final String PERFECT_USER_INFO = "/moli_mine_consumer/v1/login/perfectUserInfoSelective";//完善个人信息

    private static final String GET_USER_INFO = "/moli_mine_consumer/v1/user/selectByPrimaryKey";//根据用户ID获取用户信息

    private static final String MODTIFY_USER_INFO = "/moli_mine_consumer/v1/user/updateByPrimaryKeySelective";//修改用户信息

    private static final String GET_USER_ALBUM = "/moli_mine_consumer/v1/photo/selectAllPhotoByUserId";//获取用户照片信息

    private static final String INIT_ADD_ALBUM = "/moli_mine_consumer/v1/photo/insertSelective";//用户第一次添加照片

    private static final String UPDATE_ALBUM = "/moli_mine_consumer/v1/photo/updateByPrimaryKeySelective";//更新用户相册

    private static final String GET_FOLLOW_INFO = "/moli_mine_consumer/v1/concern/selectAllConcernByConcern";//查询关注

    private static final String GET_USER = "/moli_mine_consumer/v1/concern/selectFriendByUserId";//查询关注我的用户/我的好友

    private static final String GET_USER_COLLECT = "/moli_mine_consumer/v1/collent/selectAllCollentTypeInfo";//获取用户收藏信息

    private static final String GET_BROWSER_HISTORY = "/moli_mine_consumer/v1/skim/selectAllSkim";//浏览记录

    private static final String ADD_BROWSER_HISTORY = "/moli_mine_consumer/v1/skim/insertSelective";//增加浏览记录

    private static final String REPORT = "/moli_mine_consumer/v1/report/insertSelective";//举报

    private static final String GET_SERVICE = "/moli_mine_consumer/v1/concern/selectOfficialConcern";//获取官方客服

    private static final String CANCLE_GOOD_AT = "/moli_mine_consumer/v1/concern/updateByPrimaryKeySelective";//取消擅长

    private static final String DELETE_COMMENT = "/moli_explore_consumer/v1/comment/updateByPrimaryKeySelective";//删除评论

    private static final String FOLLOWER_USER = "/moli_mine_consumer/concern/v1.1/insertSelectiveV1Dot1";//关注用户

    private static final String CANCEL_FOLLOWER_USER = "/moli_mine_consumer/concern/v1.1/updateByPrimaryKeySelectiveV1Dot1";//取消关注用户

    private static final String GET_USER_FOLLOW_STATE = "/moli_mine_consumer/concern/v1.1/selectFriendByUserIdAndConcernId";//v1.1版本查询用户关注状态

    private static final String ADD_TO_BLACK_LIST = "/moli_mine_consumer/concern/v1.1/insertSelectiveBlack";//加入黑名单

    private static final String REMOVE_BLACK_LIST = "/moli_mine_consumer/concern/v1.1/updateSelectiveBlack";//移出黑名单

    private static final String GET_BLACK_LIST = "/moli_mine_consumer/v1/concern/selectFriendByUserId";//获取黑名单列表

    private static final String GET_HELP_MESSAGE_LIST = "/moli_mine_consumer/help/v1.3.0/selectAllHelp";//帮助中心接口

    private static final String SELECTSIGNINFO = "/moli_mine_consumer/user/v1.4.0/selectSignInfo";//签到列表
    private static final String SIGNIN = "/moli_mine_consumer/sign/v1.4.0/insertSign";//签到
    private static final String INCOMINGDETAIL = "/moli_mine_consumer/wallet/1.4.0/moneyDetailed";//收支明细 茉莉花/零钱
    private static final String EXCHANGE_PREPARE = "/moli_mine_consumer//wallet/1.4.0/selectConvertInfo";//兑换前数据准备接口
    private static final String EXCHANGE = "/moli_mine_consumer/wallet/1.4.0/insertConvert";//兑换接口
    private static final String DESPOSITMONEY = "/moli_mine_consumer/wallet/1.4.0/depositMoney";//提现
    private static final String DESPOSITMONEY_RECODER = "/moli_mine_consumer/wallet/1.4.0/depositRecord";//提现记录表接口
    private static final String BINDDWX = "/moli_mine_consumer/v1/login/bindingWxSelective";//绑定微信提现
    private static final String INVATEPAGEL_LIST = "/moli_mine_consumer/invite/V1.4.0/selectInvitePage";//邀请查询记录列表
    private static final String INPUTINVATECODE = "/moli_mine_consumer/invite/V1.4.0/inviteBinding";//绑定邀请码接口
    private static final String REDBAGLIST = "/moli_mine_consumer//wallet/1.4.0/redPackageList";//红包列表
    private static final String OPENREDBAG = "/moli_mine_consumer/wallet/1.4.0/openRedPackage";//打开红包
    private static final String SHAREURL = "/moli_mine_consumer/invite/V1.4.0/selectInviteUrl";//获取邀请分享地址

    private API_User() {

    }

    public static API_User ins() {
        if (api == null) {
            synchronized (API_User.class) {
                if (api == null) {
                    api = new API_User();
                    switch (RT.HOST) {
                        case DEVELOP:
//                             API_USER_SCHEME = "http://192.168.1.20:8030";
//                            API_USER_SCHEME = "http://192.168.1.26:8082";
                            API_USER_SCHEME = "http://192.168.1.28:8081";
                            break;
                        case DEBUG:
                            API_USER_SCHEME = "";
                            break;
                        case PUBLISH:
                            API_USER_SCHEME = "";
                            break;
                    }
                }
            }
        }
        return api;
    }

    /**
     * 打开红包列表
     *
     * @param tag
     * @param callback
     */

    public void getShareURL(String tag, String uuid, ResponseCallback callback) {
        String url = API_USER_SCHEME + SHAREURL;
        HashMap params = new HashMap();
        params.put("uuid", uuid);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 打开红包列表
     *
     * @param tag
     * @param callback
     */

    public void openRedbag(String tag, String userId, String id, ResponseCallback callback) {
        String url = API_USER_SCHEME + OPENREDBAG;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("id", id);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取邀请列表
     *
     * @param tag
     * @param callback
     */

    public void getRedbagList(String tag, String userId, ResponseCallback callback) {
        String url = API_USER_SCHEME + REDBAGLIST;
        HashMap params = new HashMap();
        params.put("userId", userId);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取邀请列表
     *
     * @param tag
     * @param callback
     */

    public void setInputinvatecode(String tag, String userId, String inviteUuid, ResponseCallback callback) {
        String url = API_USER_SCHEME + INPUTINVATECODE;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("inviteUuid", inviteUuid);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取邀请列表
     *
     * @param tag
     * @param callback
     */

    public void getInavteList(String tag, String userId, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + INVATEPAGEL_LIST;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * @param tag
     * @param platformType 第三方类型 微信2 或4
     * @param userId
     * @param platformUid  第三方微信openid
     * @param accessToken  三方token
     * @param callback
     */

    public void bindWx(String tag, String platformType, String userId, String platformUid, String accessToken, ResponseCallback callback) {
        String url = API_USER_SCHEME + BINDDWX;
        HashMap params = new HashMap();
        params.put("platformType", platformType);
        params.put("userId", userId);
        params.put("platformUid", platformUid);
        params.put("accessToken", accessToken);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 提现记录表接口
     *
     * @param tag
     * @param userId
     * @param callback
     */
    public void depositMoneyRecoder(String tag, String userId, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + DESPOSITMONEY_RECODER;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 提现接口
     *
     * @param tag
     * @param userId
     * @param callback
     */
    public void depositMoney(String tag, String userId, String money, ResponseCallback callback) {
        String url = API_USER_SCHEME + DESPOSITMONEY;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("money", money);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 兑换接口
     *
     * @param tag
     * @param userId
     * @param callback
     */
    public void exchange(String tag, String userId, String flower, ResponseCallback callback) {
        String url = API_USER_SCHEME + EXCHANGE;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("flower", flower);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 兑换前数据准备接口
     *
     * @param tag
     * @param userId
     * @param callback
     */
    public void prepareExchange(String tag, String userId, ResponseCallback callback) {
        String url = API_USER_SCHEME + EXCHANGE_PREPARE;
        HashMap params = new HashMap();
        params.put("userId", userId);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 收支明细
     *
     * @param tag
     * @param userId
     * @param callback
     */
    public void incomeDetail(String tag, String userId, String type, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + INCOMINGDETAIL;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("type", type);
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 签到
     *
     * @param tag
     * @param userId
     * @param callback
     */
    public void signIn(String tag, String userId, ResponseCallback callback) {
        String url = API_USER_SCHEME + SIGNIN;
        HashMap params = new HashMap();
        params.put("userId", userId);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 签到列表
     *
     * @param tag
     * @param userId
     * @param callback
     */
    public void getSignInfo(String tag, String userId, ResponseCallback callback) {
        String url = API_USER_SCHEME + SELECTSIGNINFO;
        HashMap params = new HashMap();
        params.put("userId", userId);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 添加收藏
     *
     * @param tag
     * @param userId      用户id
     * @param type        类型：topic, prolem, answer等
     * @param typeId      类型Id
     * @param favoritesId 收藏夹ID
     * @param callback
     */
    public void addCollect(String tag, String userId, String type, String typeId, int favoritesId, ResponseCallback callback) {
        String url = API_USER_SCHEME + ADD_COLLECT;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("type", type);
        params.put("typeId", typeId);
        params.put("favoritesId", favoritesId);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 取消收藏
     *
     * @param tag
     * @param userId
     * @param type
     * @param typeId
     * @param favoritesId
     * @param id
     * @param callback
     */
    public void cancelCollect(String tag, String userId, String type, String typeId, int favoritesId, int id, ResponseCallback callback) {
        String url = API_USER_SCHEME + CANCEL_COLLECT;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("type", type);
        params.put("typeId", typeId);
        params.put("deleted", 1);
        params.put("favoritesId", favoritesId);
        params.put("id", id);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 添加action
     *
     * @param tag
     * @param userId
     * @param type
     * @param typeId
     * @param actionType
     * @param callback
     */
    public void addAction(String tag, String userId, String type, String typeId, String actionType, ResponseCallback callback) {
        String url = API_USER_SCHEME + ACTION;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("type", type);
        params.put("typeId", typeId);
        params.put("actionType", actionType);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 取消action
     *
     * @param tag
     * @param userId
     * @param type
     * @param typeId
     * @param actionType
     * @param id
     * @param callback
     */
    public void cancelAction(String tag, String userId, String type, String typeId, String actionType, int id, ResponseCallback callback) {
        String url = API_USER_SCHEME + CANCEL_CATION;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("type", type);
        params.put("deleted", 1);
        params.put("typeId", typeId);
        params.put("actionType", actionType);
        params.put("id", id);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 点赞
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interface/debug/ffff-1497081351610-1722617555-0019
     *
     * @param tag
     * @param userId
     * @param type
     * @param typeId
     * @param actionType
     * @param invitationUserId
     * @param callback
     */
    public void addPrise(String tag, String userId, String type, String typeId, String actionType, String invitationUserId, ResponseCallback callback) {
        String url = API_USER_SCHEME + ADD_PRISE;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("type", type);
        params.put("typeId", typeId);
        params.put("actionType", actionType);
        params.put("invitationUserId", invitationUserId);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 取消赞
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interface/debug/ffff-1497081351610-1722617555-0019
     *
     * @param tag
     * @param userId
     * @param type
     * @param typeId
     * @param actionType
     * @param invitationUserId
     * @param callback
     */
    public void cancelPrise(String tag, String userId, String type, String typeId, String actionType, int id, String invitationUserId, ResponseCallback callback) {
        String url = API_USER_SCHEME + CANCEL_PRISE;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("type", type);
        params.put("typeId", typeId);
        params.put("actionType", actionType);
        params.put("deleted", 1);
        params.put("id", id);
        params.put("invitationUserId", invitationUserId);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 关注
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1494413487616-1722617555-0037
     *
     * @param tag
     * @param userId
     * @param concernId   关注ID
     * @param concernType 关注类型 参考：problem|answer|topic|user|comment|publish|story|favorites
     * @param callback
     */
    public void addFollow(String tag, String userId, String concernId, String concernType, ResponseCallback callback) {
        String url = API_USER_SCHEME + FOLLOW;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("concernId", concernId);
        params.put("concernType", concernType);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 取消关注
     *
     * @param tag
     * @param id
     * @param userId
     * @param concernId
     * @param concernType
     * @param callback
     */
    public void cancelFollow(String tag, int id, String userId, String concernId, String concernType, ResponseCallback callback) {
        String url = API_USER_SCHEME + CANCEL_FOLLOW;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("id", id);
        params.put("deleted", 1);
        params.put("concernId", concernId);
        params.put("concernType", concernType);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 送花
     *
     * @param tag
     * @param concernId
     * @param type
     * @param tpyeId
     * @param callback
     */
    public void sendFlower(String tag, String concernId, String type, String tpyeId, ResponseCallback callback) {
        String url = API_USER_SCHEME + SEND_FLOWER;
        HashMap params = new HashMap();
        if (UserManager.ins().isLogin()) {
            params.put("userId", UserManager.ins().getUserId());
        }
        params.put("collectUserId", concernId);
        params.put("type", type);
        params.put("typeId", tpyeId);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取好友列表
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1497074172490-1722617555-0018
     *
     * @param tag
     * @param pageNum
     * @param pageSize
     * @param callback
     */
    public void getFriendList(String tag, String problemId, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_INVITE_FRIEND_LIST;
        HashMap params = new HashMap();
        if (UserManager.ins().isLogin()) {
            params.put("userId", UserManager.ins().getUserId());
        }
        params.put("problemId", problemId);
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取邀请回答的推荐列表
     *
     * @param tag
     * @param problemId
     * @param callback
     */
    public void getRecommandInvitedList(String tag, String problemId, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_INVITE_USER_LIST;
        HashMap params = new HashMap();
        if (UserManager.ins().isLogin()) {
            params.put("userId", UserManager.ins().getUserId());
        }
        params.put("problemId", problemId);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 邀请回答
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1496927564927-1722617555-0012
     *
     * @param tag
     * @param invitationUserId
     * @param problemId
     * @param callback
     */
    public void inviteToAnswer(String tag, String invitationUserId, String problemId, ResponseCallback callback) {
        String url = API_USER_SCHEME + INVITE_TO_ANSWER;
        HashMap params = new HashMap();
        if (UserManager.ins().isLogin()) {
            params.put("userId", UserManager.ins().getUserId());
        }
        params.put("invitationUserId", invitationUserId);
        params.put("type", "problem");
        params.put("actionType", "invitation");
        params.put("typeId", problemId);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取用户擅长的话题
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1496734491164-1722617555-0003
     *
     * @param tag
     * @param callback
     */
    public void getGoodAtTopics(String tag, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_GOOD_AT_TOPIC;
        HashMap params = new HashMap();
        if (UserManager.ins().isLogin()) {
            params.put("userId", UserManager.ins().getUserId());
        }
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取用户擅长话题的推荐问题
     * http://doc.java.duailin.top/api/project.do#/ffff-1494211670703-1722617555-0002/front/interfaceDetail/ffff-1496999486873-1722617555-0014
     *
     * @param tag
     * @param callback
     */
    public void getGoodAtTopicProblem(String tag, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_GOOD_AT_TOPIC_PROBLEM;
        HashMap params = new HashMap();
        if (UserManager.ins().isLogin()) {
            params.put("userId", UserManager.ins().getUserId());
        }
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取被邀请回答的问题列表、
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1496998793122-1722617555-0013
     *
     * @param tag
     * @param pageNum
     * @param pageSize
     * @param callback
     */
    public void getInvitedProblemList(String tag, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_INVITI_PROBLEM_LIST;
        HashMap params = new HashMap();
        if (UserManager.ins().isLogin()) {
            params.put("userId", UserManager.ins().getUserId());
        }
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 登录
     * http://doc.java.duailin.top/api/project.do#/ffff-1495008074588-1722617555-0003/front/interfaceDetail/ffff-1495011625587-1722617555-0007
     *
     * @param phone
     * @param password
     * @param callback
     */
    public void loginByMobile(String tag, String phone, String password, ResponseCallback callback) {
        String url = API_USER_SCHEME + LOGIN;
        HashMap params = new HashMap();
        params.put("phone", phone);
        params.put("password", password);
        params.put("platformType", AppKey.LOGIN_TYPE_MOBILE);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 第三方登录
     * http://doc.java.duailin.top/api/project.do#/ffff-1495008074588-1722617555-0003/front/interfaceDetail/ffff-1495011625587-1722617555-0007
     *
     * @param tag
     * @param platformType
     * @param platformUid
     * @param accessToken
     * @param callback
     */
    public void loginByThird(String tag, int platformType, String platformUid, String accessToken, ResponseCallback callback) {
        String url = API_USER_SCHEME + LOGIN;
        HashMap params = new HashMap();
        params.put("platformUid", platformUid);
        params.put("accessToken", accessToken);
        params.put("platformType", platformType);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取验证码
     *
     * @param tag
     * @param functionType 0注册功能 验证用户是否注册过 1 重置密码 验证用户是否注册过   2 绑定第三方 是否绑定
     * @param phone
     * @param callback
     */
    public void getPhoneVerificationCode(String tag, int functionType, String phone, int platformType, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_PHONE_VERIFICATION_CODE;
        HashMap params = new HashMap();
        params.put("phone", phone);
        params.put("functionType", functionType);
        if (platformType > 0) {
            params.put("platformType", platformType);
        }
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 校验验证码
     * http://doc.java.duailin.top/api/project.do#/ffff-1495008074588-1722617555-0003/front/interfaceDetail/ffff-1497606968540-1722617555-0024
     *
     * @param tag
     * @param functionType 0注册功能 验证用户是否注册过 1 重置密码 验证用户是否注册过   2 绑定第三方 是否绑定
     * @param phone
     * @param authNum
     * @param callback
     */
    public void checkPhoneAuthCommon(String tag, int functionType, String phone, String authNum, int platformType, ResponseCallback callback) {
        String url = API_USER_SCHEME + CHECK_PHONE_AUTH_COMMON;
        HashMap params = new HashMap();
        params.put("phone", phone);
        params.put("authNum", authNum);
        params.put("functionType", functionType);
        if (platformType > 0) {
            params.put("platformType", platformType);
        }
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 重置密码
     * http://doc.java.duailin.top/api/project.do#/ffff-1495008074588-1722617555-0003/front/interfaceDetail/ffff-1497607040732-1722617555-0025
     *
     * @param tag
     * @param phone
     * @param authNum
     * @param password
     * @param callback
     */
    public void resetPassword(String tag, String phone, String authNum, String password, ResponseCallback callback) {
        String url = API_USER_SCHEME + RESET_PASSWORD;
        HashMap params = new HashMap();
        params.put("phone", phone);
        params.put("authNum", authNum);
        params.put("password", password);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 注册
     * http://doc.java.duailin.top/api/project.do#/ffff-1495008074588-1722617555-0003/front/interfaceDetail/ffff-1495009670413-1722617555-0006
     *
     * @param tag
     * @param platformType
     * @param phone
     * @param password
     * @param authNum
     * @param platformUid
     * @param accessToken
     * @param callback
     */
    public void regist(String tag, int platformType, String phone, String password, String authNum, String platformUid, String accessToken, ResponseCallback callback) {
        String url = API_USER_SCHEME + REGIST;
        HashMap params = new HashMap();
        params.put("platformType", platformType);
        if (!TextUtils.isEmpty(phone))
            params.put("phone", phone);
        if (!TextUtils.isEmpty(password))
            params.put("password", password);
        if (!TextUtils.isEmpty(authNum))
            params.put("authNum", authNum);
        if (!TextUtils.isEmpty(platformUid))
            params.put("platformUid", platformUid);
        if (!TextUtils.isEmpty(accessToken))
            params.put("accessToken", accessToken);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 完善个人信息
     * http://doc.java.duailin.top/api/project.do#/ffff-1495008074588-1722617555-0003/front/interfaceDetail/ffff-1495009670413-1722617555-0006
     *
     * @param tag
     * @param name
     * @param image
     * @param sex
     * @param age
     * @param constellation
     * @param introduce
     * @param job
     * @param address
     * @param birthday
     * @param callback
     */
    public void perfectUserInfoSelective(String tag, Context context, String userId, String name, String image, int sex, int age, String constellation, String introduce, String job, String address, String birthday, ResponseCallback callback) {
        String url = API_USER_SCHEME + PERFECT_USER_INFO;
        HashMap params = new HashMap();
        String channelId = PhoneInfoUtil.getAppChannel(RT.application);
        params.put("platformMark", channelId);
        params.put("userId", userId);
        if (!TextUtils.isEmpty(name))
            params.put("name", name);
        if (!TextUtils.isEmpty(image))
            params.put("image", image);
        if (sex > 0) {
            params.put("sex", sex);
        }
        if (age > 0) {
            params.put("age", age);
        }
        String location = PhoneInfoUtil.getLocation(context);
        if (!TextUtils.isEmpty(location) && location.contains("|")) {
            params.put("longitude", location.split("\\|")[1]);
            params.put("latitude", location.split("\\|")[0]);
        }
        if (!TextUtils.isEmpty(constellation))
            params.put("constellation", constellation);
        if (!TextUtils.isEmpty(introduce))
            params.put("introduce", introduce);
        if (!TextUtils.isEmpty(job))
            params.put("job", job);
        if (!TextUtils.isEmpty(address))
            params.put("address", address);
        if (!TextUtils.isEmpty(birthday))
            params.put("birthday", birthday);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 根据用户id获取用户信息
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1494389111577-1722617555-0028
     *
     * @param tag
     * @param id
     * @param callback
     */
    public void getUserInfoById(String tag, String id, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_USER_INFO;
        HashMap params = new HashMap();
        params.put("id", id);
        if (UserManager.ins().isLogin()) {
            params.put("uid", UserManager.ins().getUserId());
        }
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 修改用户头像
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1494387695111-1722617555-0027
     *
     * @param tag
     * @param avatarUrl
     * @param callback
     */
    public void modtifyUserAvatar(String tag, String avatarUrl, ResponseCallback callback) {
        String url = API_USER_SCHEME + MODTIFY_USER_INFO;
        HashMap params = new HashMap();
        params.put("userId", UserManager.ins().getUserId());
        params.put("id", UserManager.ins().getUserId());
        params.put("image", avatarUrl);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 修改用户信息
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1494387695111-1722617555-0027
     *
     * @param tag
     * @param callback
     */
    public void modtifyUserInfo(String tag, String name, int age, String constellation, String introduce, String birthday, String longitude, String latitude, String job, String address, ResponseCallback callback) {
        String url = API_USER_SCHEME + MODTIFY_USER_INFO;
        HashMap params = new HashMap();
        params.put("userId", UserManager.ins().getUserId());
        params.put("id", UserManager.ins().getUserId());
        if (!TextUtils.isEmpty(name))
            params.put("name", name);
        if (age > 0) {
            params.put("age", age);
        }
        if (!TextUtils.isEmpty(constellation))
            params.put("constellation", constellation);
        if (!TextUtils.isEmpty(introduce))
            params.put("introduce", introduce);
        if (!TextUtils.isEmpty(job))
            params.put("job", job);
        if (!TextUtils.isEmpty(address))
            params.put("address", address);
        if (!TextUtils.isEmpty(birthday))
            params.put("birthday", birthday);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取用户相册
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1496383424282-1722617555-0010
     *
     * @param tag
     * @param userId
     * @param callback
     */
    public void getUserAlbumByUserId(String tag, String userId, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_USER_ALBUM;
        HashMap params = new HashMap();
        params.put("userId", userId);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 添加用户相册
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1496383919934-1722617555-0012
     *
     * @param tag
     * @param userId
     * @param image
     * @param callback
     */
    public void addAlbum(String tag, String userId, String image, ResponseCallback callback) {
        String url = API_USER_SCHEME + INIT_ADD_ALBUM;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("image", image);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 更新用户相册
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1496384112817-1722617555-0013
     *
     * @param tag
     * @param userId
     * @param id
     * @param image
     * @param callback
     */
    public void updateAlbum(String tag, String userId, int id, String image, ResponseCallback callback) {
        String url = API_USER_SCHEME + UPDATE_ALBUM;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("id", id);
        params.put("image", image);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取关注的人
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1496389752272-1722617555-0015
     *
     * @param tag
     * @param userId
     * @param callback
     */
    public void getFollowUser(String tag, String userId, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_FOLLOW_INFO;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("concernType", "user");
        if (UserManager.ins().isLogin()) {
            params.put("uid", UserManager.ins().getUserId());
        }
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }


    /**
     * 获取关注我的人
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1496389752272-1722617555-0015
     *
     * @param tag
     * @param userId
     * @param callback
     */
    public void getFansUser(String tag, String userId, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_USER;
        HashMap params = new HashMap();
        params.put("userId", userId);
        if (UserManager.ins().isLogin()) {
            params.put("uid", UserManager.ins().getUserId());
        }
        params.put("type", 2);
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 查询两个用户是否关注
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1496804041118-1722617555-0006
     *
     * @param tag
     * @param concernId
     * @param callback
     */
    public void getUserFollowStated(String tag, String concernId, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_USER_FOLLOW_STATE;
        HashMap params = new HashMap();
        if (UserManager.ins().isLogin()) {
            params.put("userId", UserManager.ins().getUserId());
        }
        params.put("concernId", concernId);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }


    /**
     * 获取关注的问题
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1496389752272-1722617555-0015
     *
     * @param tag
     * @param userId
     * @param callback
     */
    public void getFollowProblem(String tag, String userId, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_FOLLOW_INFO;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("concernType", "problem");
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取关注的话题
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1496389752272-1722617555-0015
     *
     * @param tag
     * @param userId
     * @param callback
     */
    public void getFollowTopic(String tag, String userId, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_FOLLOW_INFO;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("concernType", "topic");
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取用户收藏信息
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1494487805041-1722617555-0043
     *
     * @param tag
     * @param userId
     * @param type
     * @param pageNum
     * @param pageSize
     * @param callback
     */
    public void getUserCollection(String tag, String userId, String type, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_USER_COLLECT;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("type", type);
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 添加用户浏览记录
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1494412284733-1722617555-0035
     *
     * @param tag
     * @param type
     * @param typeId
     * @param callback
     */
    public void addBrowserHistory(String tag, String type, String typeId, ResponseCallback callback) {
        if (!UserManager.ins().isLogin()) {
            return;
        }
        String url = API_USER_SCHEME + ADD_BROWSER_HISTORY;
        HashMap params = new HashMap();
        params.put("userId", UserManager.ins().getUserId());
        params.put("type", type);
        params.put("typeId", typeId);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取用户浏览记录
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1494412156645-1722617555-0034
     *
     * @param tag
     * @param type
     * @param pageNum
     * @param pageSize
     * @param callback
     */
    public void getUserBrowserHistory(String tag, String type, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_BROWSER_HISTORY;
        HashMap params = new HashMap();
        params.put("userId", UserManager.ins().getUserId());
        params.put("type", type);
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取我的好友
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1496389752272-1722617555-0015
     *
     * @param tag
     * @param pageNum
     * @param pageSize
     * @param callback
     */
    public void getMyFriend(String tag, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_USER;
        HashMap params = new HashMap();
        params.put("userId", UserManager.ins().getUserId());
        params.put("type", 1);
        if (UserManager.ins().isLogin()) {
            params.put("uid", UserManager.ins().getUserId());
        }
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 用户举报
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1494495492249-1722617555-0055
     *
     * @param tag
     * @param type
     * @param reportTypeId
     * @param callback
     */
    public void report(String tag, String type, String reportTypeId, ResponseCallback callback) {
        String url = API_USER_SCHEME + REPORT;
        HashMap params = new HashMap();
        params.put("userId", UserManager.ins().getUserId());
        params.put("type", type);
        params.put("reportTypeId", reportTypeId);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取官方客服
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1497432112436-1722617555-0022
     *
     * @param tag
     * @param callback
     */
    public void getService(String tag, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_SERVICE;
        HashMap params = new HashMap();
        params.put("userId", UserManager.ins().getUserId());
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.FIRST_CACHE_THEN_REQUEST, false, callback);
    }

    /**
     * 取消擅长
     * http://doc.java.duailin.top/api/project.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1494468519454-1722617555-0038
     *
     * @param tag
     * @param id
     * @param concernId
     * @param concernType
     * @param callback
     */
    public void cancelGoodAt(String tag, int id, String concernId, String concernType, ResponseCallback callback) {
        String url = API_USER_SCHEME + CANCLE_GOOD_AT;
        HashMap params = new HashMap();
        params.put("userId", UserManager.ins().getUserId());
        params.put("id", id);
        params.put("deleted", 1);
        params.put("concernId", concernId);
        params.put("concernType", concernType);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 删除评论
     *
     * @param tag
     * @param id
     * @param callback
     */
    public void deleteComment(String tag, String id, String type, String typeId, ResponseCallback callback) {
        String url = API_USER_SCHEME + DELETE_COMMENT;
        HashMap params = new HashMap();
        params.put("userId", UserManager.ins().getUserId());
        params.put("id", id);
        params.put("deleted", 1);
        params.put("typeId", typeId);
        params.put("type", type);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 关注用户
     * http://doc.java.duailin.top/api/index.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1499918116815-1722617555-0017
     *
     * @param tag
     * @param userId
     * @param concernId
     * @param callback
     */
    public void followUser(String tag, String userId, String concernId, ResponseCallback callback) {
        String url = API_USER_SCHEME + FOLLOWER_USER;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("concernId", concernId);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 取消关注用户
     * http://doc.java.duailin.top/api/index.do#/ffff-1494212363495-1722617555-0003/front/interfaceDetail/ffff-1499918208158-1722617555-0018
     *
     * @param tag
     * @param userId
     * @param concernId
     * @param callback
     */
    public void cancelFollowUser(String tag, String userId, String concernId, ResponseCallback callback) {
        String url = API_USER_SCHEME + CANCEL_FOLLOWER_USER;
        HashMap params = new HashMap();
        params.put("userId", userId);
        params.put("concernId", concernId);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 加入黑名单
     * http://doc.java.duailin.top/api/project.do#/ffff-1500554649851-1722617555-0002/front/interfaceDetail/ffff-1501147009555-1722617555-0006
     *
     * @param tag
     * @param concernId
     * @param callback
     */
    public void addToBackList(String tag, String concernId, ResponseCallback callback) {
        String url = API_USER_SCHEME + ADD_TO_BLACK_LIST;
        HashMap params = new HashMap();
        if (UserManager.ins().isLogin()) {
            params.put("userId", UserManager.ins().getUserId());
        }
        params.put("concernId", concernId);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 移出黑名单
     * http://doc.java.duailin.top/api/project.do#/ffff-1500554649851-1722617555-0002/front/interfaceDetail/ffff-1501147129739-1722617555-0007
     *
     * @param tag
     * @param concernId
     * @param callback
     */
    public void removeBackList(String tag, String concernId, ResponseCallback callback) {
        String url = API_USER_SCHEME + REMOVE_BLACK_LIST;
        HashMap params = new HashMap();
        if (UserManager.ins().isLogin()) {
            params.put("userId", UserManager.ins().getUserId());
        }
        params.put("concernId", concernId);
        NetworkInterface.ins().connected(HttpMethod.POST, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 加入黑名单
     * http://doc.java.duailin.top/api/project.do#/ffff-1500554649851-1722617555-0002/front/interfaceDetail/ffff-1501147294238-1722617555-0008
     *
     * @param tag
     * @param pageNum
     * @param pageSize
     * @param callback
     */
    public void getBlackList(String tag, int pageNum, int pageSize, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_BLACK_LIST;
        HashMap params = new HashMap();
        if (UserManager.ins().isLogin()) {
            params.put("userId", UserManager.ins().getUserId());
            params.put("uid", UserManager.ins().getUserId());
        }
        params.put("type", 3);
        params.put("pageNum", pageNum);
        params.put("pageSize", pageSize);
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

    /**
     * 获取帮助中心的消息
     *
     * @param tag
     * @param callback
     */
    public void getHelpMessage(String tag, ResponseCallback callback) {
        String url = API_USER_SCHEME + GET_HELP_MESSAGE_LIST;
        HashMap params = new HashMap();
        params.put("platform", "Android");
        NetworkInterface.ins().connected(HttpMethod.GET, url, tag, params, CacheMode.DEFAULT, false, callback);
    }

}
